package com.shigu;

public class MallResponse {
    private Boolean success=true;
    private String msg;
    private Boolean api;

    public <T extends MallResponse> T success(){
        this.success=true;
        return (T) this;
    }

    public <T extends MallResponse> T  success(String msg){
        this.success=true;
        this.msg=msg;
        return (T) this;
    }

    public <T extends MallResponse> T  error(){
        this.success=false;
        return (T) this;
    }

    public MallResponse error(String msg){
        this.success=false;
        this.msg=msg;
        return this;
    }


    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Boolean getApi() {
        return api;
    }

    public void setApi(Boolean api) {
        this.api = api;
    }
}
